package com.aspose.cells.a.c;

import com.aspose.cells.zaku;
import java.util.Locale;

public class zj {
   public static com.aspose.cells.b.a.c.za a(int var0) {
      return new com.aspose.cells.b.a.c.za(b((int)((short)var0)));
   }

   public static Locale b(int var0) {
      return b(zaku.c(var0));
   }

   public static int a(Locale var0) {
      String var1 = var0.getISO3Country();
      if (var1 != null) {
         if (var1.equals("USA")) {
            return 1;
         }

         if (var1.equals("CAN")) {
            return 2;
         }

         if (var1.equals("RUS")) {
            return 7;
         }

         if (var1.equals("EGY")) {
            return 20;
         }

         if (var1.equals("GRC")) {
            return 30;
         }

         if (var1.equals("NLD")) {
            return 31;
         }

         if (var1.equals("BEL")) {
            return 32;
         }

         if (var1.equals("FRA")) {
            return 33;
         }

         if (var1.equals("ESP")) {
            return 34;
         }

         if (var1.equals("HUN")) {
            return 36;
         }

         if (var1.equals("ITA")) {
            return 39;
         }

         if (var1.equals("CHE")) {
            return 41;
         }

         if (var1.equals("AUT")) {
            return 43;
         }

         if (var1.equals("GBR")) {
            return 44;
         }

         if (var1.equals("DNK")) {
            return 45;
         }

         if (var1.equals("SWE")) {
            return 46;
         }

         if (var1.equals("NOR")) {
            return 47;
         }

         if (var1.equals("POL")) {
            return 48;
         }

         if (var1.equals("DEU")) {
            return 49;
         }

         if (var1.equals("MEX")) {
            return 52;
         }

         if (var1.equals("BRA")) {
            return 55;
         }

         if (var1.equals("AUS")) {
            return 61;
         }

         if (var1.equals("NZL")) {
            return 64;
         }

         if (var1.equals("THA")) {
            return 66;
         }

         if (var1.equals("JPN")) {
            return 81;
         }

         if (var1.equals("KOR")) {
            return 82;
         }

         if (var1.equals("VNM")) {
            return 84;
         }

         if (var1.equals("CHN")) {
            return 86;
         }

         if (var1.equals("TUR")) {
            return 90;
         }

         if (var1.equals("IND")) {
            return 91;
         }

         if (var1.equals("DZA")) {
            return 213;
         }

         if (var1.equals("MAR")) {
            return 216;
         }

         if (var1.equals("LBY")) {
            return 218;
         }

         if (var1.equals("PRT")) {
            return 351;
         }

         if (var1.equals("ISL")) {
            return 354;
         }

         if (var1.equals("FIN")) {
            return 358;
         }

         if (var1.equals("CZE")) {
            return 420;
         }

         if (var1.equals("TWN")) {
            return 886;
         }

         if (var1.equals("LBN")) {
            return 961;
         }

         if (var1.equals("JOR")) {
            return 962;
         }

         if (var1.equals("SYR")) {
            return 963;
         }

         if (var1.equals("IRQ")) {
            return 964;
         }

         if (var1.equals("KWT")) {
            return 965;
         }

         if (var1.equals("SAU")) {
            return 966;
         }

         if (var1.equals("ARE")) {
            return 971;
         }

         if (var1.equals("ISR")) {
            return 972;
         }

         if (var1.equals("QAT")) {
            return 974;
         }

         if (var1.equals("IRN")) {
            return 981;
         }
      }

      String var2 = var0.getISO3Language();
      if (var2 == null) {
         return 1;
      } else if (var2.equals("spa")) {
         return 34;
      } else if (var2.equals("deu")) {
         return 49;
      } else {
         return !var2.equals("fra") && !var2.equals("fre") && !var2.equals("frm") && !var2.equals("fro") ? 1 : 33;
      }
   }

   public static Locale a(com.aspose.cells.b.a.c.za var0) {
      return var0 == null ? null : var0.h();
   }

   public static com.aspose.cells.b.a.c.za b(Locale var0) {
      return new com.aspose.cells.b.a.c.za(var0);
   }

   public static com.aspose.cells.b.a.c.za a(short var0) {
      return new com.aspose.cells.b.a.c.za(var0 & '\uffff', true);
   }

   public static Locale b(short var0) {
      String var1 = zaku.a(var0);
      if (var1 == null) {
         return Locale.getDefault();
      } else {
         String[] var2 = var1.split("-");
         switch(var2.length) {
         case 2:
            return new Locale(var2[0], var2[1]);
         case 3:
            return new Locale(var2[0], var2[2], var2[1]);
         default:
            return new Locale(var1);
         }
      }
   }
}
